package app.config;

import java.util.HashSet;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import com.jfinal.handler.Handler;

public class IgnoreHandler extends Handler {

	public static final HashSet<String> ignoreUrl = new HashSet<String>()
	{
		{
			add("/websocket");
		}
	};

	@Override
	public void handle(String target, HttpServletRequest request, HttpServletResponse response, boolean[] isHandled)
	{
		if (ignoreUrl.contains(target))
		{
			return;
		}else{
			nextHandler.handle(target, request, response, isHandled);
		}

	}

}
